﻿/*
#------------------------------------------------------------------------------
#-- Program Name:	[dbo].[spSetBackupDirectory]
#-- Purpose:		Sets the backup directory for a specific database.
#--	Last Update:	06/21/2011
#--					For a complete history - please review comments in Version
#--					control.
#-- Required XPs:	master.dbo.xp_instance_regwrite
#------------------------------------------------------------------------------
*/
CREATE PROCEDURE [dbo].[spSetBackupDirectory]
(
	@backup_directory_name		varchar(8000)
)
AS
BEGIN
	--- Set the configured backup directory from the registry
	EXEC master.dbo.xp_instance_regwrite N'HKEY_LOCAL_MACHINE', N'SOFTWARE\Microsoft\MSSQLServer\MSSQLServer', N'BackupDirectory', N'REG_SZ', @backup_directory_name
END
